<div class="wrapper-md">
  <div class="panel panel-default">
    <div class="panel-heading">

      <form class="form-search">
          <label for="phoneNum1" >手机号：</label> <input id="phoneNum1" type="text" ng-model="vm.infoUser.phoneNum" class="input-medium search-query" >
          <label for="email1" >邮箱：</label><input id="email1" type="text" ng-model="vm.infoUser.userEmail" class="input-medium search-query" >
          <button type="submit" class="btn btn-primary button_modify" style="margin-left: 20px;" ng-click="queryList()" >搜索</button>
          <button class="btn btn-success button_modify" style="float:right"  data-toggle="modal" data-target="#addUserModal" ng-click="initAddUser()" >新增用户</button>
          <button class="btn btn-success button_modify" style="float:right;margin-right: 10px;"  data-toggle="modal" data-target="#addRoleAuthModal" ng-click="initRoleAndAuthForUser()" >授权角色和资源</button>
      </form>
    </div>
  </div>

  <div class="table-responsive">
    <table id="userTable"></table>
  </div>

  <!--
    描述：添加用户模态框	addUserModal.html
    功能：Bootstrap 模态框
  -->
  <div class="modal fade" id="addUserModal" tabindex="-1" data-keyboard="false" role="dialog"
       aria-labelledby="myModalLabel" data-ng-include=" 'app/user/usersAddUserModal.html' ">
  </div>

  <!--
    	作者：dabing9
    	时间：2017-10-24
    	描述：授权用户 角色和资源 模态框
    -->
  <div class="modal fade" id="addRoleAuthModal" tabindex="-1" data-keyboard="false" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"  ng-click="close()">&times;</span></button>
          <h4 class="modal-title" id="authForRoleLabel">授权角色和资源</h4>
        </div>

        <div class="modal-body" style="overflow:auto;">
          <div style="float:left;margin-left:10%;">
            <table class="con_table">
              <thead>
                <tr class="th_tr">
                  <td style="width: 20px;">#</td>
                  <td style="width: 80px;">名称</td>
                  <td >编码</td>
                </tr>
              </thead>
              <tbody>
              <tr class="tb_tr" ng-repeat="role in vm.roles" ng-class="{tr_light: vm.selectRole.id == role.id}" ng-click="selectRole(role);">
                <td ng-bind="$index+1"></td>
                <td ng-bind="role.roleName"></td>
                <td ng-bind="role.codeName"></td>
              </tr>
              </tbody>
            </table>
          </div>

          <div style="float:right;margin-right:10%;">
            <ul id="authTree" class="ztree"></ul>
          </div>

        </div>
        <div class="modal-footer">
          <button type="submit" class="col-sm-2 btn btn-primary"
                  style="margin-left: 40%;"
                  ng-click="addRoleAndAuth()">
            保存
          </button>
        </div>
      </div>
    </div>
  </div>
</div>